"curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle)",
"docopt 0.6.8 (git+https://github.com/docopt/docopt.rs)",
"flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs)",
- "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs)",
+ "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs?ref=no-build-cmd)",
"glob 0.0.1 (git+https://github.com/rust-lang/glob)",
"hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)",
"registry 0.0.1-pre",
[[package]]
name = "docopt"
version = "0.6.8"
-source = "git+https://github.com/docopt/docopt.rs#1b614c83b771b23e95e69d10b4bc04c87ff7eff3"
+source = "git+https://github.com/docopt/docopt.rs#0b184b15ed5ea7e3c180b088e8f99baa4427f989"
[[package]]
name = "encoding"
[[package]]
name = "git2"
version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#556e27113a4918cede9b80e447a5ebad524f3357"
+source = "git+https://github.com/alexcrichton/git2-rs?ref=no-build-cmd#b7a84b817bc62df62e4449b7d78aa3887bd3b4c7"
dependencies = [
- "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs)",
+ "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs?ref=no-build-cmd)",
"url 0.1.0 (git+https://github.com/servo/rust-url)",
]
[[package]]
name = "libgit2"
version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#556e27113a4918cede9b80e447a5ebad524f3357"
+source = "git+https://github.com/alexcrichton/git2-rs?ref=no-build-cmd#b7a84b817bc62df62e4449b7d78aa3887bd3b4c7"
dependencies = [
"libssh2-static-sys 0.0.1 (git+https://github.com/alexcrichton/libssh2-static-sys)",
"link-config 0.0.1 (git+https://github.com/alexcrichton/link-config)",
[[package]]
name = "toml"
version = "0.1.0"
-source = "git+https://github.com/alexcrichton/toml-rs#78acb5081d57bec85fd51ecb596506b14d17d430"
+source = "git+https://github.com/alexcrichton/toml-rs#ac6f3b27e03e7a5938fd4cae5fc3fecc5ab1a85f"
[[package]]
name = "url"
version = "0.1.0"
-source = "git+https://github.com/servo/rust-url#9142b86a812ac5bc886f76235585557d8e002246"
+source = "git+https://github.com/servo/rust-url#cec3c32168ce4233e179f22ef50215b3a9c34342"
dependencies = [
"encoding 0.2.0 (git+https://github.com/lifthrasiir/rust-encoding)",
]
[dependencies.git2]
git = "https://github.com/alexcrichton/git2-rs"
+branch = "no-build-cmd"
[dependencies.glob]
git = "https://github.com/rust-lang/glob"
}
fn ensure_loaded(&mut self, namespace: &SourceId) -> CargoResult<()> {
- match self.source_ids.find(namespace) {
+ match self.source_ids.get(namespace) {
// We've previously loaded this source, and we've already locked it,
// so we're not allowed to change it even if `namespace` has a
// slightly different precise version listed.
// to be rewritten to a locked version wherever possible. If we're unable to
// map a dependency though, we just pass it on through.
fn lock(&self, summary: Summary) -> Summary {
- let pair = self.locked.find(summary.get_source_id()).and_then(|map| {
+ let pair = self.locked.get(summary.get_source_id()).and_then(|map| {
map.find_equiv(summary.get_name())
}).and_then(|vec| {
vec.iter().find(|&&(ref id, _)| id == summary.get_package_id())
// dependency. If anything does then we lock it to that and move
// on.
None => {
- let v = self.locked.find(dep.get_source_id()).and_then(|map| {
+ let v = self.locked.get(dep.get_source_id()).and_then(|map| {
map.find_equiv(dep.get_name())
}).and_then(|vec| {
vec.iter().find(|&&(ref id, _)| dep.matches_id(id))
let pkgid = try!(pkg.to_package_id(default));
let precise = pkgid.get_source_id().get_precise()
.map(|s| s.to_string());
- assert!(tmp.insert(pkgid.clone(), precise),
+ assert!(tmp.insert(pkgid.clone(), precise).is_none(),
"a package was referenced twice in the lockfile");
g.add(try!(pkg.to_package_id(default)), []);
Ok(())
for edge in deps.iter() {
let to_depend_on = try!(edge.to_package_id(default));
let precise_pkgid =
- tmp.find(&to_depend_on)
+ tmp.get(&to_depend_on)
.map(|p| to_depend_on.with_precise(p.clone()))
.unwrap_or(to_depend_on.clone());
g.link(package_id.clone(), precise_pkgid);
}
pub fn features(&self, pkg: &PackageId) -> Option<&HashSet<String>> {
- self.features.find(pkg)
+ self.features.get(pkg)
}
}
dep.uses_default_features(), platform);
let key = (dep.get_name().to_string(), dep.get_source_id().clone());
- let prev_active = cx.activations.find(&key)
+ let prev_active = cx.activations.get(&key)
.map(|v| v.as_slice()).unwrap_or(&[]);
log!(5, "{}[{}]>{} {} candidates", parent.get_name(), cur, dep.get_name(),
candidates.len());
}
pub fn get(&self, id: &SourceId) -> Option<&Source+'src> {
- let source = self.map.find(id);
+ let source = self.map.get(id);
source.map(|s| {
let s: &Source+'src = &**s;
}
pub fn get_mut(&mut self, id: &SourceId) -> Option<&mut Source+'src> {
- self.map.find_mut(id).map(|s| {
+ self.map.get_mut(id).map(|s| {
let s: &mut Source+'src = &mut **s;
s
})
})),
};
let triple = config.target().unwrap_or(config.rustc_host()).to_string();
- let target = match target.find(&triple) {
+ let target = match target.get(&triple) {
None => return Ok(HashMap::new()),
Some(target) => try!(target.table().chain_error(|| {
internal(format!("invalid configuration for the key \
pub fn get_requirement(&self, pkg: &'a Package,
target: &'a Target) -> PlatformRequirement {
- self.requirements.find(&(pkg.get_package_id(), target.get_name()))
+ self.requirements.get(&(pkg.get_package_id(), target.get_name()))
.map(|a| *a).unwrap_or(PlatformTarget)
}
Some(lib) => lib,
None => continue,
};
- match map.find(&lib) {
+ match map.get(&lib) {
Some(previous) => {
return Err(human(format!("native library `{}` is being linked \
to by more than one package, and \
// Note that we do not use e.toml.to_string() as we want to control the
// exact format the toml is in to ensure pretty diffs between updates to the
// lockfile.
- let root = e.toml.find(&"root".to_string()).unwrap();
+ let root = e.toml.get(&"root".to_string()).unwrap();
out.push_str("[root]\n");
emit_package(root.as_table().unwrap(), &mut out);
- let deps = e.toml.find(&"package".to_string()).unwrap().as_slice().unwrap();
+ let deps = e.toml.get(&"package".to_string()).unwrap().as_slice().unwrap();
for dep in deps.iter() {
let dep = dep.as_table().unwrap();
emit_package(dep, &mut out);
}
- match e.toml.find(&"metadata".to_string()) {
+ match e.toml.get(&"metadata".to_string()) {
Some(metadata) => {
out.push_str("[metadata]\n");
out.push_str(metadata.to_string().as_slice());
out.push_str(format!("source = {}\n", lookup(dep, "source")).as_slice());
}
- if let Some(ref s) = dep.find(&"dependencies".to_string()) {
+ if let Some(ref s) = dep.get(&"dependencies".to_string()) {
let slice = s.as_slice().unwrap();
if !slice.is_empty() {
}
fn lookup<'a>(table: &'a toml::TomlTable, key: &str) -> &'a toml::Value {
- table.find(&key.to_string()).expect(format!("Didn't find {}", key).as_slice())
+ table.get(&key.to_string()).expect(format!("Didn't find {}", key).as_slice())
}
}
// Verify what we just downloaded
- let expected = self.hashes.find(&(pkg.get_name().to_string(),
- pkg.get_version().to_string()));
+ let expected = self.hashes.get(&(pkg.get_name().to_string(),
+ pkg.get_version().to_string()));
let expected = try!(expected.require(|| {
internal(format!("no hash listed for {}", pkg))
}));
fn extract_config(mut file: File, key: &str) -> CargoResult<ConfigValue> {
let contents = try!(file.read_to_string());
let mut toml = try!(cargo_toml::parse(contents.as_slice(), file.path()));
- let val = try!(toml.pop(&key.to_string()).require(|| internal("")));
+ let val = try!(toml.remove(&key.to_string()).require(|| internal("")));
ConfigValue::from_toml(file.path(), val)
}
};
assert!(rev.insert(key.clone()));
}
- assert!(self.dep_map.insert(key, (my_dependencies, value)));
+ assert!(self.dep_map.insert(key, (my_dependencies, value)).is_none());
}
/// Dequeues a package that is ready to be built.
Some(key) => key,
None => return None
};
- let (_, data) = self.dep_map.pop(&key).unwrap();
+ let (_, data) = self.dep_map.remove(&key).unwrap();
let fresh = if self.dirty.contains(&key) {Dirty} else {Fresh};
self.pending.insert(key.clone());
Some((fresh, key, data))
/// possibly allowing the next invocation of `dequeue` to return a package.
pub fn finish(&mut self, key: &K, fresh: Freshness) {
assert!(self.pending.remove(key));
- let reverse_deps = match self.reverse_dep_map.find(key) {
+ let reverse_deps = match self.reverse_dep_map.get(key) {
Some(deps) => deps,
None => return,
};
}
pub fn edges(&self, node: &N) -> Option<Edges<N>> {
- self.nodes.find(node).map(|set| set.iter())
+ self.nodes.get(node).map(|set| set.iter())
}
pub fn sort(&self) -> Option<Vec<N>> {